from django.shortcuts import render
from django.http import HttpResponse
from django.views import View


def index(request):
    print('显示首页')
    context = {
        'name':  '张三',
        'sex': '男'
    }

    return render(request, 'index.html', context)
# Create your views here.

class RegisterView(View):
    def get(self, request):
        return render(request, 'register.html')
    def post(self, request):
        return HttpResponse('注册成功')